package com.aspose.cells;

import java.util.ArrayList;
import java.util.HashMap;

class zccr {
   private zcda a;
   private Workbook b;
   private com.aspose.cells.a.f.zi c;
   private zoz d;
   private zbxz e;
   private zauk f;
   private zaul g;
   private Worksheet h;
   private int i;
   private byte[] j;
   private int k;
   private String l;
   private String m;
   private String n;
   private String o;

   zccr(zcda var1, zoz var2, String var3, String var4, com.aspose.cells.a.f.zi var5, String var6) {
      this.a = var1;
      this.d = var2;
      this.l = var3;
      this.g = var2.a.getWorksheets().U();
      this.b = var2.a;
      this.m = var4;
      this.c = var5;
      this.n = var6;
   }

   zauk a() {
      return this.f;
   }

   void a(zbxz var1) throws Exception {
      this.e = var1;
      this.f = new zauk(this.g);
      this.f.r = zase.C(this.m);
      this.f.u = this.g.getCount();
      this.f.F = this.n;
      this.g.b(this.f);
      if (this.f.r > this.g.c) {
         this.g.c = this.f.r;
      }

      while(true) {
         this.i = this.e.a();
         switch(this.i) {
         case 179:
            this.d();
            break;
         case 180:
            this.e.a(1L);
            return;
         case 183:
            this.j();
            break;
         case 185:
            this.e();
            break;
         case 245:
            this.k();
            break;
         case 1066:
            this.c();
            break;
         default:
            this.k = this.e.b();
            this.e.a((long)this.k);
         }
      }
   }

   private void c() {
      this.j = this.a.a(this.e);
      int var1 = this.j.length;
      this.f.J = new byte[var1];
      System.arraycopy(this.j, 0, this.f.J, 0, var1);
   }

   private void d() throws Exception {
      this.j = this.a.a(this.e);
      byte var1 = this.j[3];
      if ((var1 & 255 & 1) == 1) {
         this.f.a(true, 1);
      } else {
         this.f.a(false, 1);
      }

      if ((var1 & 255 & 4) != 0) {
         this.f.a(true);
      } else {
         this.f.a(false);
      }

      this.f.B = com.aspose.cells.b.a.zc.a(this.j, 4);
      this.f.m = com.aspose.cells.b.a.zc.a(this.j, 17);
      byte var2 = this.j[16];
      int var3 = 21;
      int[] var4;
      if ((var2 & 255 & 1) != 0) {
         var4 = new int[]{var3};
         zcch.a(this.j, var4);
         var3 = var4[0];
      }

      var4 = new int[]{var3};
      this.o = zcch.a(this.j, var4);
      var3 = var4[0];
   }

   private void e() throws Exception {
      this.j = this.a.a(this.e);
      int var1 = com.aspose.cells.b.a.zc.a(this.j, 0);
      this.f.d = zcee.I(var1);
      if (this.f.d != 1 && this.f.d != 4) {
         zqc var2 = new zqc(this.f);
         var2.d = this.l;
         var2.c = this.m;
         this.f.E = var2;
      } else {
         while(true) {
            this.i = this.e.a();
            switch(this.i) {
            case 186:
               this.e.a(1L);
               return;
            case 187:
               this.i();
               break;
            case 207:
               this.f();
               break;
            default:
               this.k = this.e.b();
               this.e.a((long)this.k);
            }
         }
      }
   }

   private void f() throws Exception {
      this.j = this.a.a(this.e);
      this.f.h = (this.j[0] & 255 & 1) != 0;

      while(true) {
         this.i = this.e.a();
         switch(this.i) {
         case 208:
            this.e.a(1L);
            return;
         case 209:
            this.h();
            break;
         case 215:
            this.g();
            break;
         default:
            this.k = this.e.b();
            this.e.a((long)this.k);
         }
      }
   }

   private void g() throws Exception {
      this.j = this.a.a(this.e);
      ArrayList var1 = new ArrayList();
      int var2 = 0;
      int var3 = com.aspose.cells.b.a.zc.a(this.j, 0);
      this.f.g = new int[var3][];

      while(true) {
         this.i = this.e.a();
         switch(this.i) {
         case 216:
            this.f.n = new zaun(this.f);
            if (var1.size() != 0) {
               this.f.e = new zqr[var1.size()];

               for(int var4 = 0; var4 < var1.size(); ++var4) {
                  this.f.e[var4] = (zqr)var1.get(var4);
               }
            }

            this.e.a(1L);
            return;
         case 217:
            this.a(var1, var2);
            ++var2;
            break;
         default:
            this.k = this.e.b();
            this.e.a((long)this.k);
         }
      }
   }

   private void a(ArrayList var1, int var2) throws Exception {
      this.j = this.a.a(this.e);
      this.f.g[var2] = new int[4];
      this.f.g[var2][0] = com.aspose.cells.b.a.zc.a(this.j, 0);
      this.f.g[var2][1] = com.aspose.cells.b.a.zc.a(this.j, 4);
      this.f.g[var2][2] = com.aspose.cells.b.a.zc.a(this.j, 8);
      this.f.g[var2][3] = com.aspose.cells.b.a.zc.a(this.j, 12);
      byte var3 = this.j[16];
      boolean var4 = (var3 & 255 & 1) == 1;
      byte var5 = this.j[18];
      boolean var6 = (var5 & 255 & 1) == 1;
      boolean var7 = (var5 & 255 & 2) != 0;
      String var8 = null;
      String var9 = null;
      String var10 = null;
      Object var11 = null;
      zqr var12 = null;
      CellArea var13 = new CellArea();
      int var14 = 19;
      int[] var15;
      if (var7) {
         var15 = new int[]{var14};
         var10 = zcch.a(this.j, var15);
         var14 = var15[0];
      }

      if (var6) {
         var15 = new int[]{var14};
         zcch.a(this.j, var15);
         var14 = var15[0];
      }

      if (!var4) {
         var13 = zcch.a(this.j, var14);
      } else {
         var15 = new int[]{var14};
         var9 = zcch.a(this.j, var15);
         var14 = var15[0];
      }

      if (var9 == null && var10 != null) {
         this.h = this.b.getWorksheets().get(var10);
         if (this.h == null) {
            zqc var24 = new zqc(this.f);
            var24.d = this.l;
            var24.c = this.m;
            this.f.E = var24;
            return;
         }

         Range var23 = new Range(var13.StartRow, var13.StartColumn, var13.EndRow - var13.StartRow + 1, var13.EndColumn - var13.StartColumn + 1, this.h.getCells());
         if (zakq.b(this.h.getName())) {
            var8 = "'" + this.h.getName() + "'!" + var23.b();
         } else {
            var8 = this.h.getName() + "!" + var23.b();
         }

         var12 = new zqr(this.f, this.h, var8);
         var12.b = var23;
         var12.c = var23;
         com.aspose.cells.b.a.a.ze.a(var1, (Object)var12);
         this.f.j = this.f.i = var23.getColumnCount();
         this.f.k = var23.getRowCount() - 1;
         this.f.t = this.h;
         this.f.p = new ArrayList(this.f.i);
      } else {
         boolean var22 = var10 == null;
         if (!var22) {
            this.h = this.b.getWorksheets().get(var10);
            if (this.h == null) {
               zqc var25 = new zqc(this.f);
               var25.d = this.l;
               var25.c = this.m;
               this.f.E = var25;
               return;
            }
         }

         boolean var16 = false;
         int var17 = var22 ? -1 : this.h.getIndex();
         Name var18 = this.b.getWorksheets().getNames().a(var9, var17);
         Range var19 = null;
         if (var18 == null) {
            var16 = true;
            var18 = this.b.getWorksheets().getNames().get(var9);
         }

         zqc var20;
         if (var18 == null) {
            var20 = new zqc(this.f);
            var20.d = this.l;
            var20.c = this.m;
            this.f.E = var20;
            return;
         }

         if (var16) {
            this.h = var18.getRange().getWorksheet();
         }

         var19 = var18.s();
         if (var19 == null) {
            var20 = new zqc(this.f);
            var20.d = this.l;
            var20.c = this.m;
            this.f.E = var20;
            return;
         }

         if (!var22) {
            if (zakq.b(this.h.getName())) {
               (new StringBuilder()).append("'").append(this.h.getName()).append("'!").append(var19.b()).toString();
            } else {
               (new StringBuilder()).append(this.h.getName()).append("!").append(var19.b()).toString();
            }
         }

         zqr var21 = new zqr(this.f, this.h, var9);
         var21.b = var19;
         var21.c = var19;
         com.aspose.cells.b.a.a.ze.a(var1, (Object)var21);
         this.f.j = this.f.i = var19.getColumnCount();
         this.f.k = var19.getRowCount() - 1;
         this.f.t = this.h;
         this.f.p = new ArrayList(this.f.i);
      }

   }

   private void h() throws Exception {
      this.j = this.a.a(this.e);
      int var1 = com.aspose.cells.b.a.zc.a(this.j, 0);
      if (!this.f.h) {
         this.f.f = new String[var1][];
      } else {
         this.f.f = new String[1][];
      }

      int var2 = 0;

      while(true) {
         this.i = this.e.a();
         switch(this.i) {
         case 210:
            this.e.a(1L);
            return;
         case 211:
            this.a(var2);
            ++var2;
            break;
         default:
            this.k = this.e.b();
            this.e.a((long)this.k);
         }
      }
   }

   private void a(int var1) throws Exception {
      this.j = this.a.a(this.e);
      int var2 = com.aspose.cells.b.a.zc.a(this.j, 0);
      String[] var3 = this.f.f[var1] = new String[var2];
      int var4 = 0;
      byte var5 = 0;

      while(true) {
         this.i = this.e.a();
         switch(this.i) {
         case 212:
            this.e.a(1L);
            return;
         case 213:
            this.j = this.a.a(this.e);
            int[] var6 = new int[]{var5};
            var3[var4] = zcch.a(this.j, var6);
            int var7 = var6[0];
            var5 = 0;
            ++var4;
            break;
         default:
            this.k = this.e.b();
            this.e.a((long)this.k);
         }
      }
   }

   private void i() throws Exception {
      ArrayList var1 = new ArrayList();
      zqr var2 = null;
      String var3 = null;
      String var4 = null;
      String var5 = null;
      int var6 = 3;
      this.j = this.a.a(this.e);
      boolean var7 = (this.j[2] & 255 & 2) != 0;
      int[] var8;
      if ((this.j[0] & 255 & 1) != 0) {
         if (var7) {
            var8 = new int[]{var6};
            var5 = zcch.a(this.j, var8);
            var6 = var8[0];
         }

         var8 = new int[]{var6};
         var4 = zcch.a(this.j, var8);
         var6 = var8[0];
         if (var4.startsWith("=")) {
            var4 = var4.substring(1);
         }

         boolean var17 = var5 == null || "".equals(var5);
         boolean var19 = false;
         if (!var17 && var5 != null) {
            this.h = this.b.getWorksheets().get(var5);
         }

         int var21 = var17 ? -1 : this.h.getIndex();
         Name var12 = this.b.getWorksheets().getNames().a(var4, var21);
         Range var13 = null;
         if (var12 == null) {
            var19 = true;
            var12 = this.b.getWorksheets().getNames().get(var4);
         }

         int var22;
         if (var12 == null) {
            this.f.D = var4;
            var22 = this.j.length;
            this.f.K = new byte[var22];
            System.arraycopy(this.j, 0, this.f.K, 0, var22);
            return;
         }

         if (var19 && var12.getRange() != null) {
            this.h = var12.getRange().getWorksheet();
         }

         var13 = var12.s();
         if (var13 == null) {
            this.f.D = var4;
            var22 = this.j.length;
            this.f.K = new byte[var22];
            System.arraycopy(this.j, 0, this.f.K, 0, var22);
            return;
         }

         String var14 = var4;
         if (!var17) {
            if (zakq.b(this.h.getName())) {
               var14 = "'" + this.h.getName() + "'!" + var13.b();
            } else {
               var14 = this.h.getName() + "!" + var13.b();
            }
         }

         zqr var15 = new zqr(this.f, this.h, var14);
         var15.b = var13;
         var15.c = var13;
         com.aspose.cells.b.a.a.ze.a(var1, (Object)var15);
         this.f.j = this.f.i = var13.getColumnCount();
         this.f.k = var13.getRowCount() - 1;
         this.f.t = this.h;
         this.f.p = new ArrayList(this.f.i);
      } else {
         var8 = new int[]{var6};
         var5 = zcch.a(this.j, var8);
         var6 = var8[0];
         Worksheet var9 = var5 != null && !"".equals(var5) ? this.b.getWorksheets().get(var5) : this.h;
         if (var9 == null) {
            zqc var18 = new zqc(this.f);
            var18.d = this.l;
            var18.c = this.m;
            this.f.E = var18;
            return;
         }

         CellArea var10 = zcch.a(this.j, var6);
         if (var10.StartColumn < 0 || var10.StartRow < 0 || var10.EndRow < var10.StartRow || var10.EndColumn < var10.StartColumn) {
            zqc var20 = new zqc(this.f);
            var20.d = this.l;
            var20.c = this.m;
            this.f.E = var20;
            return;
         }

         Range var11 = new Range(var10.StartRow, var10.StartColumn, var10.EndRow - var10.StartRow + 1, var10.EndColumn - var10.StartColumn + 1, var9.getCells());
         if (zakq.b(var9.getName())) {
            var3 = "'" + var9.getName() + "'!" + var11.b();
         } else {
            var3 = var9.getName() + "!" + var11.b();
         }

         var2 = new zqr(this.f, var9, var3);
         var2.b = var11;
         var2.c = var11;
         com.aspose.cells.b.a.a.ze.a(var1, (Object)var2);
         this.f.j = this.f.i = var11.getColumnCount();
         this.f.k = var11.getRowCount() - 1;
         this.f.t = this.h;
         this.f.p = new ArrayList(this.f.i);
      }

      this.f.z = null;
      if (var1.size() != 0) {
         this.f.e = new zqr[var1.size()];

         for(int var16 = 0; var16 < var1.size(); ++var16) {
            this.f.e[var16] = (zqr)var1.get(var16);
         }
      }

   }

   private void j() throws Exception {
      this.j = this.a.a(this.e);
      byte var1 = this.j[0];
      byte var2 = this.j[1];
      boolean var3 = (var1 & 255 & 8) != 0;
      boolean var4 = (var2 & 255 & 1) != 0;
      String var5 = "";
      zbqs var6 = new zbqs(this.f);
      var6.o = (var1 & 255 & 4) == 0;
      var6.a(false);
      if (this.f.p == null) {
         this.f.p = new ArrayList();
      }

      com.aspose.cells.b.a.a.ze.a(this.f.p, (Object)var6);
      var6.q = com.aspose.cells.b.a.zc.a(this.j, 2);
      byte var7 = 20;
      int[] var8 = new int[]{var7};
      var6.a = zcch.a(this.j, var8);
      int var9 = var8[0];
      if (var3) {
         var8 = new int[]{var9};
         zcch.a(this.j, var8);
         var9 = var8[0];
      }

      if (var4) {
         var6.g(true);
         int var10 = com.aspose.cells.b.a.zc.a(this.j, var9);
         if (var10 > 0) {
            var6.e = new byte[var10];
            System.arraycopy(this.j, var9 + 4, var6.e, 0, var10);
            var6.f = new ArrayList();
         }
      }

      var6.c = new ArrayList();

      while(true) {
         this.i = this.e.a();
         switch(this.i) {
         case 184:
            this.e.a(1L);
            return;
         case 189:
            this.b(var6);
            break;
         case 219:
            this.a(var6);
            break;
         case 255:
            if (var6.f == null) {
               var6.f = new ArrayList();
            }

            zbrf var11 = new zbrf();
            com.aspose.cells.b.a.a.ze.a(var6.f, (Object)var11);
            this.a(var11);
            break;
         default:
            this.k = this.e.b();
            this.e.a((long)this.k);
         }
      }
   }

   private void a(zbrf var1) {
      this.j = this.a.a(this.e);
      var1.b = (int)(com.aspose.cells.b.a.zc.d(this.j, 0) & 4294967295L);
      var1.c = this.j[4] & 255;
      boolean var2 = (this.j[5] & 255 & 1) != 0;
      if (var2) {
         var1.a |= 2;
      }

      while(true) {
         this.i = this.e.a();
         switch(this.i) {
         case 256:
            this.e.a(1L);
            return;
         case 259:
            zbrg var3 = new zbrg();
            var1.b().a(var3);
            this.j = this.a.a(this.e);
            var3.c = this.j[0] & 255;
            var3.a = (int)(com.aspose.cells.b.a.zc.d(this.j, 1) & 4294967295L);
            var3.b = (int)(com.aspose.cells.b.a.zc.d(this.j, 5) & 4294967295L);
            break;
         default:
            this.k = this.e.b();
            this.e.a((long)this.k);
         }
      }
   }

   private void a(zbqs var1) throws Exception {
      this.j = this.a.a(this.e);
      SxRng var2 = new SxRng(var1);
      var1.j = var2;
      var1.h(true);
      var2.l = com.aspose.cells.b.a.zc.a(this.j, 0);
      var2.k = com.aspose.cells.b.a.zc.a(this.j, 4);

      while(true) {
         this.i = this.e.a();
         switch(this.i) {
         case 220:
            this.e.a(1L);
            return;
         case 221:
            this.c(var2);
            break;
         case 222:
         case 224:
         default:
            this.k = this.e.b();
            this.e.a((long)this.k);
            break;
         case 223:
            this.a(var2);
            break;
         case 225:
            this.b(var2);
         }
      }
   }

   private void a(SxRng var1) {
      this.j = this.a.a(this.e);
      var1.c = zcee.P(this.j[0] & 255);
      var1.a = (this.j[1] & 255 & 1) != 0;
      var1.b = (this.j[1] & 255 & 2) != 0;
      boolean var2 = (this.j[1] & 255 & 4) != 0;
      if (var2) {
         double var3 = com.aspose.cells.b.a.zc.f(this.j, 2);
         double var5 = com.aspose.cells.b.a.zc.f(this.j, 10);
         var1.f = CellsHelper.getDateTimeFromDouble(var3, false);
         var1.g = CellsHelper.getDateTimeFromDouble(var5, false);
      } else {
         var1.h = com.aspose.cells.b.a.zc.f(this.j, 2);
         var1.i = com.aspose.cells.b.a.zc.f(this.j, 10);
      }

      var1.j = com.aspose.cells.b.a.zc.f(this.j, 18);
   }

   private void b(SxRng var1) {
      this.j = this.a.a(this.e);
      var1.n = new ArrayList();

      while(true) {
         this.i = this.e.a();
         switch(this.i) {
         case 26:
            this.j = this.a.a(this.e);
            com.aspose.cells.b.a.a.ze.a(var1.n, (Object)com.aspose.cells.b.a.zc.a(this.j, 0));
            break;
         case 226:
            this.e.a(1L);
            return;
         default:
            this.k = this.e.b();
            this.e.a((long)this.k);
         }
      }
   }

   private void c(SxRng var1) throws Exception {
      this.j = this.a.a(this.e);
      var1.d = new ArrayList();

      label76:
      while(true) {
         this.i = this.e.a();
         zbmb var2;
         switch(this.i) {
         case 20:
            this.j = this.a.a(this.e);
            var2 = new zbmb();
            var2.a = null;
            com.aspose.cells.b.a.a.ze.a(var1.d, (Object)var2);
            break;
         case 21:
            this.j = this.a.a(this.e);
            var2 = new zbmb();
            var2.a = com.aspose.cells.b.a.zc.f(this.j, 0);
            com.aspose.cells.b.a.a.ze.a(var1.d, (Object)var2);
            break;
         case 22:
            this.j = this.a.a(this.e);
            var2 = new zbmb();
            var2.a = this.j[0] != 0;
            com.aspose.cells.b.a.a.ze.a(var1.d, (Object)var2);
            break;
         case 23:
            this.j = this.a.a(this.e);
            var2 = new zbmb();
            switch(this.j[0]) {
            case 0:
               var2.a = "#NULL!";
               break;
            case 7:
               var2.a = "#DIV/0!";
               break;
            case 15:
               var2.a = "#VALUE!";
               break;
            case 23:
               var2.a = "#REF!";
               break;
            case 29:
               var2.a = "#NAME?";
               break;
            case 36:
               var2.a = "#NUM!";
               break;
            case 42:
               var2.a = "#N/A";
            }

            com.aspose.cells.b.a.a.ze.a(var1.d, (Object)var2);
            break;
         case 24:
            this.j = this.a.a(this.e);
            var2 = new zbmb();
            byte var3 = 0;
            int[] var4 = new int[]{var3};
            var2.a = zcch.a(this.j, var4);
            int var10 = var4[0];
            com.aspose.cells.b.a.a.ze.a(var1.d, (Object)var2);
            break;
         case 25:
            this.j = this.a.a(this.e);
            var2 = new zbmb();
            var2.a = this.a((byte[])this.j, 0);
            com.aspose.cells.b.a.a.ze.a(var1.d, (Object)var2);
            break;
         case 191:
            this.j = this.a.a(this.e);
            short var5 = com.aspose.cells.b.a.zc.b(this.j, 0);
            int var6 = com.aspose.cells.b.a.zc.a(this.j, 2);
            int var7 = 6;
            int var8;
            switch(var5) {
            case 1:
               var8 = 0;

               while(true) {
                  if (var8 >= var6) {
                     continue label76;
                  }

                  var2 = new zbmb();
                  var2.a = com.aspose.cells.b.a.zc.f(this.j, var7);
                  com.aspose.cells.b.a.a.ze.a(var1.d, (Object)var2);
                  var7 += 8;
                  ++var8;
               }
            case 2:
               var8 = 0;

               while(true) {
                  if (var8 >= var6) {
                     continue label76;
                  }

                  var2 = new zbmb();
                  int[] var9 = new int[]{var7};
                  var2.a = zcch.a(this.j, var9);
                  var7 = var9[0];
                  com.aspose.cells.b.a.a.ze.a(var1.d, (Object)var2);
                  ++var8;
               }
            case 4:
               var8 = 0;

               while(true) {
                  if (var8 >= var6) {
                     continue label76;
                  }

                  var2 = new zbmb();
                  var2.a = this.j[var7] != 0;
                  com.aspose.cells.b.a.a.ze.a(var1.d, (Object)var2);
                  ++var7;
                  ++var8;
               }
            case 32:
               for(var8 = 0; var8 < var6; ++var8) {
                  var2 = new zbmb();
                  var2.a = this.a(this.j, var7);
                  com.aspose.cells.b.a.a.ze.a(var1.d, (Object)var2);
                  var7 += 8;
               }
            default:
               continue;
            }
         case 222:
            this.e.a(1L);
            return;
         default:
            this.k = this.e.b();
            this.e.a((long)this.k);
         }
      }
   }

   private void b(zbqs var1) throws Exception {
      this.j = this.a.a(this.e);
      short var2 = com.aspose.cells.b.a.zc.b(this.j, 0);
      var1.f((var2 & 4) != 0);
      var1.e((var2 & 8) != 0);
      var1.j((var2 & 16) != 0);
      var1.n = (var2 & 32) != 0;
      var1.b((var2 & 64) != 0);
      var1.c((var2 & 128) != 0);
      var1.p = (var2 & 512) != 0;
      new zbmb();
      boolean var4 = false;

      while(true) {
         this.i = this.e.a();
         zbmb var3;
         short var5;
         int var9;
         switch(this.i) {
         case 20:
         case 27:
            this.j = this.a.a(this.e);
            var3 = new zbmb();
            var3.a = null;
            if (this.i == 27) {
               var5 = com.aspose.cells.b.a.zc.b(this.j, 0);
               var3.b = (var5 & 2) != 0;
               var3.c = (var5 & 1) != 0;
            }

            com.aspose.cells.b.a.a.ze.a(var1.c, (Object)var3);
            var1.a(true);
            break;
         case 21:
         case 28:
            this.j = this.a.a(this.e);
            var3 = new zbmb();
            if (this.i == 28) {
               var5 = com.aspose.cells.b.a.zc.b(this.j, 8);
               var3.b = (var5 & 2) != 0;
               var3.c = (var5 & 1) != 0;
            }

            var3.a = com.aspose.cells.b.a.zc.f(this.j, 0);
            com.aspose.cells.b.a.a.ze.a(var1.c, (Object)var3);
            var1.a(true);
            break;
         case 22:
         case 29:
            this.j = this.a.a(this.e);
            var3 = new zbmb();
            var3.a = this.j[0] != 0;
            if (this.i == 29) {
               var5 = com.aspose.cells.b.a.zc.b(this.j, 1);
               var3.b = (var5 & 2) != 0;
               var3.c = (var5 & 1) != 0;
            }

            com.aspose.cells.b.a.a.ze.a(var1.c, (Object)var3);
            var1.a(true);
            var1.e(true);
            break;
         case 23:
         case 30:
            this.j = this.a.a(this.e);
            var3 = new zbmb();
            switch(this.j[0]) {
            case 0:
               var3.a = "#NULL!";
               break;
            case 7:
               var3.a = "#DIV/0!";
               break;
            case 15:
               var3.a = "#VALUE!";
               break;
            case 23:
               var3.a = "#REF!";
               break;
            case 29:
               var3.a = "#NAME?";
               break;
            case 36:
               var3.a = "#NUM!";
               break;
            case 42:
               var3.a = "#N/A";
            }

            if (this.i == 30) {
               var5 = com.aspose.cells.b.a.zc.b(this.j, 1);
               var3.b = (var5 & 2) != 0;
               var3.c = (var5 & 1) != 0;
            }

            com.aspose.cells.b.a.a.ze.a(var1.c, (Object)var3);
            var1.a(true);
            var1.e(true);
            break;
         case 24:
         case 31:
            this.j = this.a.a(this.e);
            var3 = new zbmb();
            byte var11 = 0;
            int[] var10 = new int[]{var11};
            var3.a = zcch.a(this.j, var10);
            var9 = var10[0];
            if (this.i == 31) {
               var5 = com.aspose.cells.b.a.zc.b(this.j, var9);
               var3.b = (var5 & 2) != 0;
               var3.c = (var5 & 1) != 0;
            }

            com.aspose.cells.b.a.a.ze.a(var1.c, (Object)var3);
            var1.a(true);
            var1.e(true);
            break;
         case 25:
         case 32:
            this.j = this.a.a(this.e);
            var3 = new zbmb();
            var3.a = this.a((byte[])this.j, 0);
            if (this.i == 32) {
               var5 = com.aspose.cells.b.a.zc.b(this.j, 8);
               var3.b = (var5 & 2) != 0;
               var3.c = (var5 & 1) != 0;
            }

            com.aspose.cells.b.a.a.ze.a(var1.c, (Object)var3);
            var1.a(true);
            break;
         case 190:
            this.e.a(1L);
            return;
         case 191:
            this.j = this.a.a(this.e);
            var5 = com.aspose.cells.b.a.zc.b(this.j, 0);
            int var6 = com.aspose.cells.b.a.zc.a(this.j, 2);
            var9 = 6;

            for(int var7 = 0; var7 < var6; ++var7) {
               var3 = new zbmb();
               switch(var5) {
               case 1:
                  var3.a = com.aspose.cells.b.a.zc.f(this.j, var9);
                  var9 += 8;
                  var1.b(true);
                  break;
               case 2:
                  int[] var8 = new int[]{var9};
                  var3.a = zcch.a(this.j, var8);
                  var9 = var8[0];
                  var1.e(true);
                  break;
               case 4:
                  var3.a = this.j[var9] != 0;
                  ++var9;
                  break;
               case 16:
                  switch(this.j[var9]) {
                  case 0:
                     var3.a = "#NULL!";
                     break;
                  case 7:
                     var3.a = "#DIV/0!";
                     break;
                  case 15:
                     var3.a = "#VALUE!";
                     break;
                  case 23:
                     var3.a = "#REF!";
                     break;
                  case 29:
                     var3.a = "#NAME?";
                     break;
                  case 36:
                     var3.a = "#NUM!";
                     break;
                  case 42:
                     var3.a = "#N/A";
                  }

                  var1.e(true);
                  ++var9;
                  break;
               case 32:
                  var3.a = this.a(this.j, var9);
                  var9 += 8;
                  break;
               case 256:
                  var3.a = null;
               }

               com.aspose.cells.b.a.a.ze.a(var1.c, (Object)var3);
            }

            var1.a(true);
            break;
         default:
            this.k = this.e.b();
            this.e.a((long)this.k);
         }
      }
   }

   private void k() {
      this.j = this.a.a(this.e);
      zaus var1 = new zaus(this.f);
      if (this.f.v == null) {
         this.f.v = new zaur();
      }

      this.f.v.a(var1);
      byte var2 = 4;
      int var3 = com.aspose.cells.b.a.zc.a(this.j, var2);
      if (var3 > 0) {
         var1.c = new byte[var3];
         System.arraycopy(this.j, var2 + 4, var1.c, 0, var3);
      }

      zbro var4 = new zbro();
      var1.f = var4;
      this.a(var1.f);
      var1.a(((zbqw)var1.f.e.get(0)).b());
      var1.b(var1.b());
      this.a(var1);
   }

   private void a(zaus var1) {
      if (var1.d == null) {
         var1.d = new zbrk();
      }

      while(true) {
         this.i = this.e.a();
         switch(this.i) {
         case 246:
            this.e.a(1L);
            return;
         case 254:
            this.e.a(1L);
            return;
         case 255:
            zbrf var2 = new zbrf();
            var1.d.a(var2);
            this.a(var2);
            break;
         default:
            this.k = this.e.b();
            this.e.a((long)this.k);
         }
      }
   }

   private void a(zbro var1) {
      zbqw var2 = null;

      while(true) {
         this.i = this.e.a();
         switch(this.i) {
         case 247:
            this.j = this.a.a(this.e);
            var1.b = this.j[0];
            int var3 = com.aspose.cells.b.a.zc.a(this.j, 4);
            var1.b(this.j[4]);
            var1.a((var3 & 256) != 0);
            var1.b((var3 & 512) != 0);
            var1.c((var3 & 1024) != 0);
            var1.d((var3 & 2048) != 0);
            var1.e((var3 & 4096) != 0);
            var1.f((var3 & 8192) != 0);
            var1.h((var3 & 16384) != 0);
            var1.g((var3 & '耀') != 0);
            var1.a((byte)(this.j[6] & 255 & 15));
            var1.a = (byte)((this.j[6] & 255 & 240) >> 4 + (this.j[7] & 255) & 15);
            break;
         case 248:
            this.e.a(1L);
            return;
         case 251:
            this.j = this.a.a(this.e);
            var2 = new zbqw();
            com.aspose.cells.b.a.a.ze.a(var1.e, (Object)var2);
            var2.b(com.aspose.cells.b.a.zc.a(this.j, 0));
            short var4 = com.aspose.cells.b.a.zc.b(this.j, 8);
            var2.e = (var4 & 1) != 0;
            var2.f = (var4 & 2) != 0;
            var2.g = (var4 & 4) != 0;
            var2.h = (var4 & 8) != 0;
            var2.i = (var4 & 16) != 0;
            var2.j = (var4 & 32) != 0;
            var2.k = (var4 & 64) != 0;
            var2.l = (var4 & 128) != 0;
            var2.m = (var4 & 256) != 0;
            var2.n = (var4 & 512) != 0;
            var2.o = (var4 & 1024) != 0;
            var2.p = (var4 & 2048) != 0;
            var2.a((this.j[10] & 255 & 1) != 0);
            break;
         case 382:
            this.j = this.a.a(this.e);
            if (var2.c == null) {
               var2.c = new ArrayList();
            }

            com.aspose.cells.b.a.a.ze.a(var2.c, (Object)com.aspose.cells.b.a.zc.a(this.j, 0));
            break;
         default:
            this.k = this.e.b();
            this.e.a((long)this.k);
         }
      }
   }

   void b() throws Exception {
      HashMap var1 = this.d.c();
      if (var1 != null && this.o != null) {
         if (!var1.containsKey(this.o)) {
            throw new CellsException(6, "pivotCacheRecord rid " + this.i + " not found in pivotCache rels file");
         } else {
            zqe var2 = (zqe)var1.get(this.o);
            zcct var3 = new zcct(this.a, this.d, this.f, var2.e, this.c);
            String var4 = "xl/pivotCache/" + com.aspose.cells.b.a.d.zk.b(var2.e);
            zbxz var5 = zcda.a(this.c, var4);
            if (null != var5) {
               var3.a(var5);
            }
         }
      }
   }

   private DateTime a(byte[] var1, int var2) {
      int var3 = com.aspose.cells.b.a.zc.e(this.j, 0 + var2) & '\uffff';
      int var4 = com.aspose.cells.b.a.zc.e(this.j, 2 + var2) & '\uffff';
      byte var5 = this.j[4 + var2];
      new DateTime(1900, 1, 1);
      DateTime var6;
      if (var5 == 0) {
         var6 = new DateTime(var3, var4, 1);
      } else {
         var6 = new DateTime(var3, var4, this.j[4 + var2] & 255, this.j[5 + var2] & 255, this.j[6 + var2] & 255, this.j[7 + var2] & 255);
      }

      return var6;
   }
}
